package com.iwhalecloud.bss.kite.cucc.service.attr.handler;

import com.iwhalecloud.bss.kite.client.enums.TriggerStrategy;
import com.iwhalecloud.bss.kite.cucc.common.constant.LocalKeyConsts;
import com.iwhalecloud.bss.kite.manager.inst.KiteAttr;
import com.iwhalecloud.bss.kite.manager.inst.KiteInst;
import com.iwhalecloud.bss.kite.service.attr.AttrData;
import com.iwhalecloud.bss.kite.service.attr.handler.AbstractAttrHandler;

/**
 * 是否收取违约金
 */
public class DamageFeeSwitchAttrHandler extends AbstractAttrHandler<KiteInst, AttrData> {
    @Override
    public void set(KiteAttr attr, KiteInst inst, String value, AttrData data) {
        super.set(attr, inst, value, data);
        //是否收取违约金的值为否的说明是要做终止或已做过终止的,展示出来,传到下游
        if (TriggerStrategy.LOAD_VALUE.equals(data.getTriggerStrategy()) && "1_0000107".equals(attr.getValue())) {
            attr.setShowType(LocalKeyConsts.PROD_ATTR_SHOW_TYPE_D);
        }
    }
}
